package cn.edu.nuc.onlinestore.model;

import java.io.Serializable;


public class Client implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -6143474194815121598L;
	private Integer id;
	private String name;
	private String password;
	
	
	
	
	
	public Client(String name,String password ) {
		this.name=name;
		this.password=password;
	}
	
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	


	public Integer getId() {
		return id;
	}


	public void setId(Integer id) {
		this.id = id;
	}


	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	
	
	@Override
	public int hashCode() {
		
		return this.name.hashCode();
	}


	@Override
	public boolean equals(Object obj) {
		Client a=(Client)obj;
		if(a.getName().equals(this.name))
		{
			return true;
		}
		return false;
	}


	@Override
	public String toString() {
		
		return this.name+"  "+this.id+"   "+this.password;
	}
	
	
	
}
